def numericSum(n):
    sum = abs(n)
    s = 0
    while sum > 0:
        a = sum % 10
        s += a
        sum = sum // 10
    return s
x=int(input("请输入一个数字："))
print(numericSum(x))
        